#include <iostream>
#include <utility>


void process(int & data)
{
    std::cout << "process left" << std::endl;
}

void process(int && data)
{
    std::cout << "process right" << std::endl;
}


void logAndProcess(int & data)
{
    std::cout << "log left" << std::endl;
    process(data);
}

void logAndProcess(int && data)
{
    std::cout << "log right" << std::endl;
    process(std::forward<int>(data));
}

int main()
{
    int a = 2;
    logAndProcess(std::move(a));
    return 0;
}